﻿<div class="blade-static __bottom" ng-if="blade.isNew" ng-include="'$(Platform)/Scripts/common/templates/ok.tpl.html'"></div>
<div class="blade-content">
    <div class="blade-inner">
        <div class="inner-block">
            <p class="note" ng-if="!seoInfos.length">Store doesn't have any language set. Assign some languages first.</p>
            <form name="formScope" class="form" novalidate ng-if="seoInfos.length">
                <fieldset ng-init="setForm(formScope);">
                    <legend>
                        URL keyword
                    </legend>
                    <div class="form-group" ng-repeat="data in seoInfos | orderBy:languageCode">
                        <ng-form name="form">
                            <div class="form-input __langs">
                                <span class="flag flag-{{data.languageCode.substr(3).toLowerCase()}}"></span>
                                <input ng-model="data.semanticUrl" name="semanticUrl{{$index}}" required ui-validate=" 'semanticUrlValidator($value)' " placeholder="Enter keyword" />
                            </div>
                            <div class="form-error" data-ng-show="form.semanticUrl{{$index}}.$dirty">
                                <span data-ng-show="form.semanticUrl{{$index}}.$error.required">Required</span>
                                <span data-ng-show="form.semanticUrl{{$index}}.$error.validator">Invalid characters in URL found</span>
                            </div>
                        </ng-form>
                    </div>
                </fieldset>
                <fieldset>
                    <legend>
                        Page title
                    </legend>
                    <div class="form-group" ng-repeat="data in seoInfos | orderBy:languageCode">
                        <div class="form-input __langs">
                            <span class="flag flag-{{data.languageCode.substr(3).toLowerCase()}}"></span>
                            <input ng-model="data.pageTitle" class="form-control" placeholder="Enter title" />
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                    <legend>
                        Meta description
                    </legend>
                    <div class="form-group" ng-repeat="data in seoInfos | orderBy:languageCode">
                        <div class="form-input __langs">
                            <span class="flag flag-{{data.languageCode.substr(3).toLowerCase()}}"></span>
                            <textarea ng-model="data.metaDescription" class="form-control" cols="30" rows="3" placeholder="Enter description"></textarea>
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                    <legend>
                        Image alternative text
                    </legend>
                    <div class="form-group" ng-repeat="data in seoInfos | orderBy:languageCode">
                        <div class="form-input __langs">
                            <span class="flag flag-{{data.languageCode.substr(3).toLowerCase()}}"></span>
                            <input ng-model="data.imageAltDescription" class="form-control" placeholder="Enter text" />
                        </div>
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
</div>